package org.marketlive.system.encryption;

import java.util.Date;


/*
(C) Copyright MarketLive. 2006. All rights reserved.
MarketLive is a trademark of MarketLive, Inc.
Warning: This computer program is protected by copyright law and international treaties.
Unauthorized reproduction or distribution of this program, or any portion of it, may result
in severe civil and criminal penalties, and will be prosecuted to the maximum extent
possible under the law.
*/

/**
 * Interface for KeyStore methods.
 */
public interface IKeyStore {
    /**
     * Returns the code identifier for this key store.
     * @return
     */
    String getCode();

    /**
     * Set the code identifier for this key store.
     * @param code
     */
    void setCode(String code);

    /**
     * Get the private key for this key store.
     * @return  returns a byte array.
     */
    String getPrivateKey();

    /**
     * Set the private key for this key store to the given byte array.
     * @param privateKey  a byte array.
     */
    void setPrivateKey(String privateKey);

    /**
     * Returns the public key for this key store.
     * @return
     */
    String getPublicKey();

    /**
     * Sets the public key for this key store.
     * @param publicKey  a byte array.
     */
    void setPublicKey(String publicKey);

    /**
     * Returns the date this keystore was created.
     * @return
     */
    Date getDateCreated();

    /**
     * Set the date this keystore was created.
     * @param dateCreated
     */
    void setDateCreated(Date dateCreated);

    /**
     * Returns the active status for this keystore.
     * @return
     */
    boolean isActive();

    /**
     * Set the active flag for this keystore.  Data is encrypted using the keys for the active keystore.
     * @param active
     */
    void setActive(boolean active);

    /**
     * Return the hibernate version.
     *
     * @return int
     */
    int getVersion();

    /**
     * Set hibernate version.
     *
     * @param version the version.
     */
    void setVersion(int version);
    
    
}
